package com.esun.payment_api.mapper;

import com.esun.common.bean.PageRequest;
import com.esun.payment_api.domain.User;
import com.esun.payment_api.domain.UserDept;
import com.esun.payment_api.domain.UserExample;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Short id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Short id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User getUserByUsername(PageRequest pageRequest);

    //通过id获取用户与部门信息
    UserDept getUserDeptById(Short userId);
    //判断是否需要修改密码
    String checkUserIsUpdatePwd(Short id);
}